 6-May-87 09:27:22-MDT,1303;000000000000
Return-Path: <dzzr@LANL.GOV>
Received: from LANL.GOV by SIMTEL20.ARPA with TCP; Wed, 6 May 87 09:26:56 MDT
Received: by LANL.GOV (5.54/5.17)
	id AA06128; Wed, 6 May 87 09:26:33 MDT
Date: Wed, 6 May 87 09:26:33 MDT
From: dzzr@LANL.GOV (Douglas J Roberts)
Message-Id: <8705061526.AA06128@LANL.GOV>
To: northstar-users@simtel20.arpa
Subject: A problem with the parallel output port.
Cc: dzzr@LANL.GOV

I recently stuck an external modem on my old Northstar, using the
second of its two serial ports. I then constructed a parallel cable,
(thanks, Ted)
removed the serial interface card from the Epson MX-80, and modified
my LifeBoat Associates CP/M 2.21 using MOVCPM and SYSGEN to tell
the system that the printer was now on the parallel output port.

What reached the printer was (seemingly) bit-shifted garbage. The
handshaking worked fine, but I suspect that the printer driver in my
CPM is fouled.

I then wrote a little 8080 test code to send characters to the
parallel output port, and it worked fine. I would like to modify
my USER.ASM file to include a parallel port driver that I know
works, but I don't know how to patch the user stuff into CPM after 
I'm done.

Can anyone out there in NETLAND help? 
	
Thanks in advance for all the good help....

--Doug Roberts
10-May-87 17:19:22-MDT,4408;000000000000
Return-Path: <@wiscvm.wisc.edu:JETP502@CALSTATE.BITNET>
Received: from wiscvm.wisc.edu by SIMTEL20.ARPA with TCP; Sun, 10 May 87 17:18:47 MDT
Received: from CALSTATE.BITNET by wiscvm.wisc.edu ; Sun, 10 May 87 17:57:10 CDT
Received: by CCS.CSUSCC.CALSTATE.EDU from Mail by CSUMailer (1.0a);
Comment: 10 May 87 15:52:21 PST
Date:     Sun, 10 May 1987 15:51 PDT
From:     JETP502%CALSTATE.BITNET@wiscvm.wisc.edu
Subject:  Patching Lifeboat USER.ASM
To:       NORTHSTAR-USERS@SIMTEL20.ARPA

Extracted  from  "CP/M2  ON  NORTH  STAR  DISK  DOUBLE DENSITY - QUAD
CAPACITY USER'S NOTES BY LIFEBOAT ASSOCIATES"

There  are  two  methods of making changes in your I/O.  The SAVEUSER
program  is providad as a quick and easy way of making short patches.
The  SYSGEN  procedure  is  a  comprehensive  method of making system
changes.

                     PATCHING WITH SAVEUSER

     Running the SAVEUSER program at any time will write a portion of
the then running  CP/M system onto the disk in drive A.  The specific
portion written consists  of  the  entire USER AREA (512 bytes or two
pages starting at BIOS+700 hex) and  the  MODE  AREA which is the 128
bytes  immediately  before  the  USER AREA.  In the distribution  24K
system the MODE AREA starts at 5980  hex  and the USER AREA starts at
5A00 hex and ends at 5BFF hex.

     Normal changes in the MODE AREA would  be  modifying  the  CONFG
byte  at  59F8 hex for two sided or fast stepping drives or making  a
permanent change in the MODE BYTE.  Complete definitions of these are
in Appendix A.  Any changes in the USER AREA would be for the purpose
of making a  quick  patch  to  your  CONSOLE,  LIST,  PUNCH or READER
routines.    These patches could be made with DDT and if  they  prove
satisfactory, permanently saved on the system disk with SAVEUSER.

     To run the program, simply type "SAVEUSER".  It will sign on and
ask for confirmation  that  you really wish to write onto the disk in
drive A.  A <CR> response will  begin  the write.  You may also abort
without writing anything by entering control C.


                        SYSGEN PROCEDURE.

     The  SYSGEN PROCEDURE is an advanced  method  of  changing  your
system configuration.    It  should  only be used when your system is
running  properly and you have become completely  familiar  with  the
features of CP/M.  This procedure uses the ED.COM editor, the ASM.COM
assembler,    the  DDT.COM  debugger,  and  the  SYSGEN.COM  program.
Familiarize yourself with the use of these programs before attempting
to change your system configuration in this way.

     This procedure uses the facilities of CP/M to create an assembly
language file containing  your  customized  I/O.    Use as a starting
point  USER.ASM  which  contains the proper equates and  jump  table.
Modify USER.ASM using ED  to  suit  your  own  purposes.   Be sure to
change the equate for MSIZE in the file to the desired memory size of
your CP/M.  Next, assemble your modified file with ASM.COM to produce
USER.HEX  which  will  be  used  to  overlay and modify your existing
system.

     The existing system is then brought into memory at location 900H
(hex)  using  the SYSGEN program.  This  is  the  standard  and  most
convenient memory  location  for  making  changes in the CP/M system.
The copy of CP/M starting at 900H is usually called the SYSGEN IMAGE.
Save  the  SYSGEN  IMAGE  as  a  disk file by the  command  "SAVE  40
CPM.COM<CR>".

     CPM.COM is then brought back  into  memory  under the control of
DDT with the command "DDT CPM.COM<CR>". The SYSGEN IMAGE  at  900H is
then  overlaid  with  USER.HEX  using  the  "I"  insert  and "R" read
commands of DDT.

     Note  that  USER.HEX is read in with an offset so that  the  hex
file will be placed  at 2700H.  The offset changes for each different
CP/M system size and is  equal  to  2700 hex minus wherever your USER
AREA begins in memory (5A00 hex in standard  24K system).  The proper
offset  is  automatically  calculated for each MSIZE  by  the  OFFSET
equate in USER.ASM or the DDT  "H"  hex  calculator may be used as in
the example.

     At this point, the new system has been  patched with your custom
I/O and may be directly put on the system tracks with SYSGEN or saved
again as a disk file for later use.

                              -end-

27-May-87 09:16:29-MDT,1633;000000000000
Return-Path: <dzzr@LANL.GOV>
Received: from LANL.GOV by SIMTEL20.ARPA with TCP; Wed, 27 May 87 09:16:10 MDT
Received: by LANL.GOV (5.54/1.14)
	id AA02139; Wed, 27 May 87 09:15:07 MDT
Date: Wed, 27 May 87 09:15:07 MDT
From: dzzr@lanl.gov (Douglas J Roberts)
Message-Id: <8705271515.AA02139@LANL.GOV>
To: northstar-users@simtel20.arpa
Subject: Bug in Lifeboat CP/M 2.2 Parallel printer driver.

Some of you may remember about a month ago I sent a message to the
N* group asking for help in patching my Lifeboat User area. Thanks
for all the help that you sent. With your help, and the reference
listed below, I fanally found & fixed the problem. It seems that
the driver that came with the system set the high bit on each
output character, effectivly putting my Epson MX-80 into graphics
mode!

I went out yesterday & purchased the "Soul of CP/M", a pretty good
reference, and was finally able to patch a modified parallel port
driver into the Lifeboat CPM. What follows is the offending original
driver -- all I did was remove the indicated line:


COUT2:
	;Parallel port output.
	IN	6		;Motherboard status
	ANI	1
	JZ	COUT2	
	MVI	A,20H		;Reset PO flag
	OUT	6		;Output char
	MOV	A,C  		;Load accumulator
TIN1:
	ORI	80H		;Set strove false <-- REMOVE THIS ONE!!!
	OUT	0		;and send character
	XRI	80H		;Toggle strobe
	OUT	0		;Output
	XRI	80H		;and toggle again
	OUT	0
	ANI	7FH		;Mask to ASCII
	RET

What I needed, and what the "Soul" was able to give me was instructions
on how to compute the offset for reading in the modified User area
with DDT.

Thanks again for all your help!

--Doug
